//
//  EditFormController.h
//  MClient
//
//  Created by  史正烨 on 09-10-19.
//  Copyright 2009 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "MCEditTableViewController.h"
#import "MCControl.h"
#import "BMapKit.h"
#import <CoreLocation/CoreLocation.h>
#import <QuartzCore/QuartzCore.h>

@interface EditFormController : MCEditTableViewController <UIWebViewDelegate,BMKSearchDelegate,BMKMapViewDelegate,CLLocationManagerDelegate>{
	NSString *dataObjectName;
	NSString *layoutName;
	NSString *keyValue;
	NSMutableArray *initialValues;
	NSMutableDictionary *formData;
	NSMutableDictionary *formLayout;
	NSMutableArray *editButtons;
	int tabIndex;
	NSMutableDictionary *formLayoutCopy;
	int		 buttonCol;
	NSMutableArray *withFormButtons;
	NSMutableDictionary *imageSizeMap;
    
    //    by yuxiaotong start
    UITextField *jingField;
    UITextField *weiField;
    //百度地图
    BMKMapView* mapView3;
    BMKSearch *_search2;
    CLLocationCoordinate2D _coordinate;
}
//百度地图
@property (retain, nonatomic) BMKMapView* mapView3;
@property (retain, nonatomic) BMKSearch *_search2;
@property (nonatomic) CLLocationCoordinate2D _coordinate;
@property (nonatomic, retain) UITextField *jingField;
@property (nonatomic, retain) UITextField *weiField;

@property (nonatomic, retain) NSString *dataObjectName;
@property (nonatomic, retain) NSString *layoutName;
@property (nonatomic, retain) NSString *keyValue;
@property (nonatomic, retain) NSMutableArray *initialValues;
@property (nonatomic, retain) NSMutableDictionary *formData;
@property (nonatomic, retain) NSMutableDictionary *formLayout;


@property (nonatomic, retain) UITextField *coordField;


- (void)getDataFromServer;
- (void)setLookupBackFillByFieldName:(NSString *)fieldName fieldDataLookupBack:(NSMutableDictionary *)fieldDataLookupBack;
- (void)doCalcAction:(MCTextField *)valueField;
//- (void)setFormulaData:(NSString *)fieldName fieldData:(NSMutableDictionary *)fieldData;
- (void)setFormulaData: (NSMutableDictionary *)returnValue;

// 实现单选下拉框与文本框联动
- (void)autoBackFill:(NSString *)fieldName fieldValue:(NSString *)value;

@end
